import time #0
f1 = open('m1_sorted.txt')  #1
a1 = [int(i) for i in f1]
start = time.time()
n = len(a1)
for i in range(n-1):
    for j in range (n-2,i-1, -1):
        if a1[j]>a1[j+1]:
            a1[j], a1[j+1]=a1[j+1],a1[j]
finish = time.time()
print('m1_sorted', round((finish - start)*1000), 'milliseconds')
f2 = open('m2_reverse.txt') #2
a2 = [int(i) for i in f2]
start = time.time()
n = len(a2)
for i in range(n-1):
    for j in range (n-2,i-1, -1):
        if a2[j]>a2[j+1]:
            a2[j], a2[j+1]=a2[j+1],a2[j]
finish = time.time()
print('m2_reverse', round((finish - start)*1000), 'milliseconds')
f3 = open('m3_shuffle.txt') #3
a3 = [int(i) for i in f3]
start = time.time()
n = len(a3)
for i in range(n-1):
    for j in range (n-2,i-1, -1):
        if a3[j]>a3[j+1]:
            a3[j], a3[j+1]=a3[j+1],a3[j]
finish = time.time()
print('m3_shuffle', round((finish - start)*1000), 'milliseconds')